<?php
namespace app\firm\model;

use think\Model;
use traits\model\SoftDelete;

class Project extends Model {
    
     protected $autoWriteTimestamp = true;

    use SoftDelete;

    protected $deleteTime = 'delete_time';

    /*
     * 查询企业上传项目信息
     * @param $where where
     * @param $field field
     * @author cpy(1442435897@qq.com)
     */
    public function getInfo($where,$field = '*') {
        $res = $this->field($field)->where($where)->find();
        return empty($res)?array():$res->toArray();
    }
    
     /*
     * 查询所有企业用户项目
     * @param $where where
     * @param $field field
     * @author cpy(1442435897@qq.com)
     */
    public function selectProjectInfo($where,$field = '*') {
        $res = $this->field($field)->where($where)->select();
        return empty($res)?array():$res->toArray();
    }

}
